﻿using System;


namespace QuakeStats
{
    class CommandLineArguments
    {
        private string _fileName = string.Empty;
        
        /// <summary>
        /// The name of the file to parse
        /// </summary>
        public string FileName 
        { 
            get
            {
                if (string.IsNullOrEmpty(_fileName))
                    return "games.log";
        
                return _fileName;
            }
            set { _fileName = value; }
        }
            
        /// <summary>
        /// Optional value if you don't run the log file on the day it was generated, use this date to tell the app what day the log entries are for.
        /// </summary>
        public int? TimeDifference { get; set; }


        private DateTime _baseDate;
        public DateTime? BaseDate
        {
            get
            {
                if (_baseDate == DateTime.MinValue)
                    _baseDate = DateTime.Now;
                return _baseDate;
            }
            set 
            {
                _baseDate = value.HasValue ? value.Value : DateTime.Now;
            }
        }
    }
}
